import React, { Component } from 'react';

export default class CommunicationIn extends Component {
  emit = e => {
    this.props.cb(e.target.value);
  }

  render() {
    return (
      <div>
        <p>子组件</p>
        <p>Msg: {this.props.value}</p>
        <input type="text" value={this.props.value} onChange={this.emit} />
      </div>
    )
  }
}